<include file="public@header"/>
</head>
<body>
<div class="wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a>{:lang('USER_INDEXADMIN_INDEX')}</a></li>
    </ul>
    <form class="well form-inline margin-top-20" method="post" action="{:url('user/adminIndex/index')}">
        关键字：
        <input class="form-control" type="text" name="keyword" style="width: 200px;" value="{:input('request.keyword')}" placeholder="用户名/手机号">
        <input type="submit" class="btn btn-primary" value="搜索"/>
        <a class="btn btn-danger" href="{:url('user/adminIndex/index')}">清空</a>
    </form>
    <form method="post" class="js-ajax-form">
        <table class="table table-hover table-bordered">
            <thead>
            <tr>
                <th>ID</th>
                <th>用户名</th>
                <th>头像</th>
                <th>性别</th>
                <th>出生日期</th>
                <th>手机号</th>
                <th>是否VIP</th>
                <th>状态</th>
                <th>{:lang('ACTIONS')}</th>
            </tr>
            </thead>
            <tbody>
            <foreach name="list" item="vo">
                <tr>
                    <td>{$vo.id}</td>
                    <td>{$vo.nickname}</td>
                    <td>
                        <notempty name="vo.avatar">
                            <a href="javascript:parent.imagePreviewDialog('{:cmf_get_image_preview_url($vo.avatar)}');">
                                <i class="fa fa-photo fa-fw"></i>
                            </a>
                            <else/>
                            <i class="fa fa-close fa-fw"></i>
                        </notempty>
                    </td>
                    </td>
                    <td>{$vo.sex}</td>
                    <td>{$vo.birthday}</td>
                    <td>{$vo.mobile}</td>
                    <td>{$vo.is_vip}</td>
                    <td>
                        <switch name="vo.status">
                            <case value="0">
                                <span class="label label-success">{$status[$vo['status']]}</span>
                            </case>
                            <case value="1">
                                <span class="label label-warning">{$status[$vo['status']]}</span>
                            </case>
                        </switch>
                    </td>
                    <td>
                        <switch name="vo.status">
                            <case value="0">
                                <a class="btn btn-xs btn-warning js-ajax-dialog-btn" href="{:url('adminIndex/ban',array('id'=>$vo['id']))}" data-msg="{:lang('BLOCK_USER_CONFIRM_MESSAGE')}">{:lang('BLOCK_USER')}</a>
                            </case>
                            <case value="1">
                                <a class="btn btn-xs btn-success js-ajax-dialog-btn" href="{:url('adminIndex/cancelban',array('id'=>$vo['id']))}" data-msg="{:lang('ACTIVATE_USER_CONFIRM_MESSAGE')}">{:lang('ACTIVATE_USER')}</a>
                            </case>
                        </switch>
                    </td>
                </tr>
            </foreach>
            </tbody>
        </table>
        <div class="pagination">{$page|default=''}</div>
    </form>
</div>
<script src="__STATIC__/js/admin.js"></script>
</body>
</html>